<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
        <form:form modelAttribute="admission" method="post" action="/admin/admission/edit" >
            <div class="colmask threecol">
                <div class="colmid">
                    <div class="colleft">
                        <div class="col1" >
                            <table class="simple" >
                                <tr>
                                    <td>Player</td>
                                    <td><c:out value="${admission.personFirstName}"/> <c:out value="${admission.personLastName}"/></td>
                                </tr>
                                <tr>
                                    <td>Season</td>
                                    <td><form:select path="seasonId">
                                            <c:forEach var="season" items="${seasons}">
                                                <form:option value="${season.id}">
                                                    <c:out value="${season.name}"/>
                                                </form:option>
                                            </c:forEach>
                                        </form:select>
                                    </td>
                                </tr>
                            </table>
                            <input type="submit" value="<c:if test="${not empty admission.id}" >Edit</c:if><c:if test="${empty admission.id}" >Add</c:if>" />
                            </div>
                        </div>
                    </div>
                </div>
                           <br>
            <br>
            <form:errors path="*"/>
        </form:form>
    </body>
</html>
